package org.sissgr.com {
	import mx.controls.Button;
	

	public class ButtonOperaciones extends Button
	{
		
		[Bindable] public var tipo:String = "";
		
		[Embed(source="assets/img/add.png")]
		private static var imgAdd:Class;
		
		[Embed(source="assets/img/delete.png")]
		private static var imgDelete:Class;
		
		[Embed(source="assets/img/pencil.png")]
		private static var imgUpdate:Class;
		
		override protected function createChildren():void{
			super.createChildren();
		}
		
		
		override protected function updateDisplayList(w:Number, h:Number):void{
			super.updateDisplayList(w,h);
			
			this.width = 19;
			this.height = 19;
			
			if(tipo == "add")
			{
				this.setStyle('icon',imgAdd);
			    this.toolTip = "Agregar";
			}
			if(tipo == "delete")
			{
				this.setStyle('icon',imgDelete);
			    this.toolTip = "Eliminar";	
			}		
			if(tipo == "update")
			{
				this.setStyle('icon',imgUpdate);
				this.toolTip = "Actualizar";
			}			
						
				
				
			
		}
		
	
	}


}